<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>Github Page demo</title>
    </head>


    <body>
        <form>
            <p>请输入密码 <input type="password" name="pw" id="pw2" >
                <input type="submit" value="确认" id="submit"  onclick= "validate()"/>
            </p>
        </form>

        <script type="text/javascript">
            function validate() {
                var pw2 = document.getElementById("pw2").value;
                if(pw2 == "1") {
                    window.open('/page/ming')
                }
                else {
                    alert("密码错误")
                }
            }
        </script>
    </body>

</html>